home_path = '/afs/inf.ed.ac.uk/user/s07/s0785186/Desktop/Project/';
addpath(genpath(home_path));

location = 'dice';
name = 'main';
dataset = LoadDataset(location,name);

results = pca(dataset);
coefficients = results(1);
components = results(2);
variances = results(3);

savefile = strcat(home_path,'datasets/dataset_',name, '_pca','.mat');
save(savefile, 'coefficients','components','variances');
disp(sprintf('Saving PCA data: %s', savefile)); 